<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="">
    <title>选项卡页面</title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <% include("../inc/list_css.html"){}%>
</head>
<body>
<div class="ibox">
    <div class="ibox-title">
        <div class="pull-left mbx navbar_title">
            <span>会员管理 </span>
            <span class="line">/</span>
            会员列表
        </div>
    </div>
    <div class="ibox-content">
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-md-12 padding-bottom-80">
                    <div id="eventsToolbar" class="form-inline">
                        注册时间:
                        <input class="light-input layer-date " data-skin="default" id="starttime" onclick="laydate({istime:true,format:'YYYY-MM-DD'})" placeholder="开始时间" style="vertical-align:bottom;width: 100px"/>
                        -<input class="light-input layer-date  checkspace" data-skin="default" id="endtime" onclick="laydate({istime:true,format:'YYYY-MM-DD'})" placeholder="结束时间" style="vertical-align:bottom;width: 100px"/>
                        关键字:&nbsp;<input class="light-input" name="title_id" id="phone" placeholder="手机号" style="">
                        <button class="hive-btn margin-left-5" id="search" onclick="searchList()">&nbsp;搜索&nbsp;</button>
                    </div>
                    <table data-toggle="table " id="table" data-show-export="true" class=" table-striped table-no-bordered fixed-table-container table-row-border-color table-hovered table-hover">
                        <thead class="table-header">
                        <tr>
                            <th data-field="phone">手机号</th>
                            <th data-field="createDate">注册时间</th>
                            <!--<th data-field="head" data-formatter="opFormatter" data-halign="center" data-align="center" data-width="120">操作-->
                            </th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<% include("../inc/list_js.html"){}%>
<script src="https://static.9hive.cn/global/vendor/layer/laydate/laydate.js"></script>
<script>

    function searchList() {
        $('#table').bootstrapTable("refresh");
    }

    function amountFormatter(v) {
        return v+'元';
    }

    function realAmountFormatter(v) {
        return v+'元';
    }

    function ordersFormatter(v) {
        if (v=='new') {
            return '未支付';
        }else if(v=='cancel') {
            return '已取消';
        }else if(v=='success'){
            return '已出票';
        }else if(v=='refund'){
            return '已退款';
        }else if(v='repeat'){
            return '重复下单';
        }
    }


    function opFormatter(value, row, index) {//

        var html = '<a href="javascript:void(0)" class="icon-material hive_icon color_normal" onclick="detail(\'' + row.order_no + '\');" data-toggle="tooltip" data-placement="top" title="详情"></a>';
        return html;
    }

    function detail(v) {
        window.location.href = "detail?order_no=" + v + "";
    }


    (function () {
        $('#table').bootstrapTable({
            url: "ajaxlist",
            search: false,
            pagination: true,
            showRefresh: false,
            showToggle: false,
            showColumns: true,
            queryParamsType: '',
            sidePagination: 'server',//启用后台分页
            pageSize: 20,
            iconSize: 'outline',
            toolbar: '#eventsToolbar',
            queryParams: function queryParams(params) {
                var temp = {  //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                    pageSize: params.pageSize,
                    pageNumber: params.pageNumber,
                    starttime: $("#starttime").val(),
                    endtime: $("#endtime").val(),
                    phone: $("#phone").val(),
                    order_no: $("#order_no").val(),
                    ukey:$("#ukey").val(),
                    status:$("#status").val()

                };
                return temp;
            },
            icons: {
                refresh: 'icon-refresh',
                toggle: 'glyphicon-list-alt',
                columns: 'icon-select',
                export: 'icon-export'
            },
            responseHandler: function (res) {
                return {
                    "rows": res.list,
                    "total": res.totalRow
                };
            },
            formatNoMatches: function () { //判断有无数据
                var imghtml = '<div class="flexed_column content_center content_alignCenter padding-20"><img src="https://static.9hive.cn/global/img/nodata.png" class="no_data"/><span class="font-size-16">暂无数据</span></div>';
                return imghtml;
            },
            formatLoadingMessage: function () {  //数据加载中样式
                return ' <div id="loading"><div id="loading-center">' +
                    '<div id="loading-center-absolute"><div class="object" id="object_one">' +
                    '</div><div class="object" id="object_two"></div><div class="object" id="object_three">' +
                    '</div><div class="object" id="object_four"></div></div></div>努力加载中...</div>'
            }
        });
        $(".wrapper").tooltip({selector: "[data-toggle=tooltip]", container: "body"});

    })();
</script>




